%用线路限速补充缺失的线路限速数据
%输入:限速数据 km/h;补充的最高限速
function output = fill_speedlimit(speedlimit,maxSpeed)
origin_size = size(speedlimit,1);
n = 1;
output = speedlimit;
for i = 1:origin_size-1
    n = n + 1;
    if speedlimit(i,2) == speedlimit(i+1,1)
        output(n,:) = speedlimit(i+1,:);
    else
        output(n,:) = [speedlimit(i,2) speedlimit(i+1,1) maxSpeed]; % 补充一段缺失的最大限速
        n = n + 1;
        output(n,:) = speedlimit(i+1,:);
    end
end

